package testPat;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

public class TestPatTest {

	static TestPat testobject;
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		System.out.println("BeforeClass");
		testobject = new TestPat(); 
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
		System.out.println("AfterClass");
	}

	@Before
	public void setUp() throws Exception {
		System.out.println("Before");
	}

	@After
	public void tearDown() throws Exception {
		System.out.println("After");
	}

	@Test
	public void testPat() {
		System.out.println("Teste1");
		assertEquals("Teste Mensagem", 2, testobject.pat("abcd".toCharArray(), "cd".toCharArray()) );
		//assertEquals("Ms2", 3, testobject.pat("abcd".toCharArray(), "cd".toCharArray()) );
		//fail("Not yet implemented"); // TODO
	}
	
	@Test
	public void testPat1() {
		System.out.println("Teste2");
		assertEquals("Ms1", 2, testobject.pat("abcd".toCharArray(), "cd".toCharArray()) );		
		//fail("Not yet implemented"); // TODO
	}


}
